<extend name="Public/base"/>

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>[{$title}] 列表({$count})</h2>
    </div>
    <!-- 数据列表 -->
    <div class="data-table">
        <div class="data-table table-striped">
            <table>
                <!-- 表头 -->
                <thead>
                    <tr>
                        <th>业务员</th>
                        <th>借款人身份证</th>
                        <th>借款人姓名</th>
                        <th>借款人手机号</th>
                        <th>状态</th>
                        <th>审核助理</th>
                        <th>操作</th>
                    </tr>
                </thead>

                <!-- 列表 -->
                <tbody>
                    <volist name="data" id="val">
                        <tr>
                            <td>{$val.mname}</td>
                            <td>{$val.cid}</td>
                            <td>{$val.cname}</td>
                            <td>{$val.mobile_tel}</td>
                            <td>{$val.status|get_order_status}</td>
                            <td>{$val.id|get_order_zl}</td>
                            <td>
                                <a target="_blank" href="{:U('Order/detail','oid='.$val[id])}">查看</a>&nbsp;&nbsp;&nbsp;&nbsp;
                                <if condition="$val['status'] eq 2">
                                    <a class='ajax-get' href="{:U('Order/lemedo','oid='.$val[id])}">我来处理</a>
                                </if>
                                <if condition="($val['status'] eq 3) OR ($val['status'] eq 31) OR ($val['status'] eq 32)">
                                    <a href="{:U('Order/download_exl','oid='.$val[id])}">导出EXL</a>
                                </if>

                            </td>
                        </tr>
                    </volist>
                </tbody>
            </table>
        </div>
    </div>
    <div class="page">
        {$_page|default=''}
    </div>
</block>

<block name="script">
<script type="text/javascript">
$(function(){
	//搜索功能
	$("#search").click(function(){
		var url = $(this).attr('url');
        var query  = $('.search-form').find('input').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
        query = query.replace(/^&/g,'');
        if( url.indexOf('?')>0 ){
            url += '&' + query;
        }else{
            url += '?' + query;
        }
		window.location.href = url;
	});

    //回车自动提交
    $('.search-form').find('input').keyup(function(event){
        if(event.keyCode===13){
            $("#search").click();
        }
    });

})
</script>
</block>
